package com.hitqz.robot.biz.websocket.util;

import com.hitqz.robot.api.common.enums.SubscribeTopicEnum;
import com.hitqz.robot.biz.websocket.endpoint.SubscriptionEndpoint;
import com.hitqz.robot.biz.websocket.endpoint.SubscriptionEquipmentStatusEndpoint;

/**
 * @author xupkun
 * @date 2024/5/24
 */
public class BroadcastTopicUtil {

    public static void broadcastMessageByTopic(String topic, String message) {
        SubscriptionEndpoint.broadcast(topic, message);
    }


    /**
     * 根据用户进行发布
     * @param RandomId
     * @param subscribeTopicEnum
     * @param message
     */

    public static void broadcastMessageByRandomId(Integer randomId, SubscribeTopicEnum subscribeTopicEnum, String message) {
        SubscriptionEquipmentStatusEndpoint.broadcast(randomId, subscribeTopicEnum, message);
    }

}
